import chatIcon from '@/assets/chat.png';
import setIcon from '@/assets/set.png';
import workIcon from '@/assets/work.png';
import { Image } from 'antd';
import React from 'react';
import styles from './index.less';

interface CustomIconProps {
  menuItemProps: any;
}

const CustomIcon: React.FC<CustomIconProps> = ({ menuItemProps }) => {
  const icons: any = {
    工作台: workIcon,
    会话: chatIcon,
    运营配置: setIcon,
  };

  return (
    <div className={styles.menuItem}>
      <Image
        src={icons[menuItemProps.name]}
        width={40}
        height={40}
        preview={false}
      />
      <span className={styles.menuName}>{menuItemProps.name}</span>
    </div>
  );
};

export default CustomIcon;
